<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:constants="http://www.tuanzi.com/constants/tags"
                xmlns:h="http://java.sun.com/jsf/html">

    <div class="ui-g">
        <div class="ui-g-12">
            <div class="ui-g-12"><h3><b>基础信息</b></h3></div>
            <div class="ui-g-2"><p:outputLabel for="need_login" value="是否需要登录"/></div>
            <div class="ui-g-10">
                <p:inputSwitch id="need_login"
                               value="#{memberRightsInfoBean.$.need_login}"
                               offLabel="否"
                               onLabel="是" disabled="#{memberRightsInfoBean.isView()}" />
            </div>

            <div class="ui-g-2"><p:outputLabel value="全选"/></div>
            <div class="ui-g-10">
                <p:commandButton value="全选"
                                 actionListener="#{memberRightsInfoBean.onSelectAllProduct()}"
                                 update="productId"
                                 process="@this"
                                 disabled="#{memberRightsInfoBean.isView()}"/>
            </div>

            <div class="ui-g-2">
                <p:outputLabel for="productId" value="产品"/>
            </div>
            <div class="ui-g-10">
                <p:selectManyButton id="productId" value="#{memberRightsInfoBean.$.product_id}" disabled="#{memberRightsInfoBean.isView()}"
                                 filter="true" updateLabel="true" filterMatchMode="contains">
                    <!--<f:selectItem itemLabel="- 请选择 -" itemValue="" noSelectionOption="true"/>-->
                    <f:selectItems
                            value="#{memberRightsInfoBean.commProductIds}"
                            var="product"
                            itemLabel="#{product.name}" itemValue="#{product.productId}"/>
                </p:selectManyButton>
            </div>

            <div class="ui-g-2"><p:outputLabel for="url" value="跳转链接"/></div>
            <div class="ui-g-10">
                <p:inputText id="url" value="#{memberRightsInfoBean.$.url}" disabled="#{memberRightsInfoBean.isView()}"/>
            </div>


        </div>

    </div>
</ui:composition>